
<form action="<?php echo url_for('@directors_edit_save') ?>" method="post"  enctype="multipart/form-data"  autocomplete="off">
    <input type="hidden" name="hdId" value="<?php echo $director->getId() ?>" />
<h1>Editar director "<?php echo $director->getName(); ?>"</h1>
<table width="100%" cellpadding="5" cellspacing="5">
  <tr>
    <td>Nombre</td>
    <td><input type="text" id="name" name="name" value="<?php echo $director->getName(); ?>" /></td>
  </tr>
  <tr>
    <td>Cargo</td>
    <td><input type="text" id="position" name="position" value="<?php echo $director->getPosition(); ?>" /></td>
  </tr>
  <tr>
    <td>Periodo de tiempo</td>
    <td><input type="text"  name="fecha" value="<?php echo $director->getFecha(); ?>" /></td>
  </tr>
  <tr>
    <td>Contenido</td>
    <td><textarea style="width: 100%;" id="content" name="content"><?php echo $director->getContent(); ?></textarea></td>
  </tr>


  <tr>
    <td>Imagen de la portada</td>
    <td>
        <?php $DS = DIRECTORY_SEPARATOR; ?>
        <?php if(file_exists(sfConfig::get('sf_upload_dir').$DS."autoridades".$DS.$director->getId().".jpg")){ ?>
            <?php echo image_tag('/uploads/autoridades/'.$director->getId().'.jpg','size=245x306') ?>
            <br />
        <?php } ?>
        <input type="file" name="image" />
    </td>
    <td><em style="color: gray;"></em></td>
  </tr>
  
  <tr>
    <td colspan="2" align="center">
      <input type="submit" value="Guardar Cambios"/>
    </td>
  </tr>
</table>
</form>